<html>
<head><meta charset="utf-8"><title>TAITs sync · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html">TAITs sync</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245690083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245690083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245690083">(Jul 12 2021 at 14:02)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> and (perhaps?) <span class="user-mention" data-user-id="116113">@lqd</span> ?</p>



<a name="245690101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245690101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245690101">(Jul 12 2021 at 14:02)</a>:</h4>
<p>TAIT sync now?</p>



<a name="245690806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245690806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245690806">(Jul 12 2021 at 14:09)</a>:</h4>
<p>(I'll be reading this thread soon after the meeting, I had only started looking into <a href="https://github.com/rust-lang/rust/issues/86411">#86411</a> --- but wondered if the plan to fix this issue was somewhat <a href="https://github.com/rust-lang/rust/issues/86411#issuecomment-870918909">close to what I imagined</a>, though I remember there's some other piece of visitor infra that caches types and visits and would be less naive than what this comment proposes of course)</p>



<a name="245707933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245707933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245707933">(Jul 12 2021 at 16:05)</a>:</h4>
<p>(I only now realize it was a Zoom meeting)</p>



<a name="245847937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245847937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245847937">(Jul 13 2021 at 16:09)</a>:</h4>
<p>lol, sorry</p>



<a name="245847943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245847943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245847943">(Jul 13 2021 at 16:09)</a>:</h4>
<p>we actually took some notes</p>



<a name="245848004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245848004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245848004">(Jul 13 2021 at 16:09)</a>:</h4>
<p><a href="https://hackmd.io/FNLjLrevQcSKoIDAsf9ivQ">https://hackmd.io/FNLjLrevQcSKoIDAsf9ivQ</a></p>



<a name="245848080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245848080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245848080">(Jul 13 2021 at 16:10)</a>:</h4>
<p>We realied that more work might be required than originally anticipated :)</p>



<a name="245850772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245850772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245850772">(Jul 13 2021 at 16:30)</a>:</h4>
<p>again ?!</p>



<a name="245851058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245851058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245851058">(Jul 13 2021 at 16:32)</a>:</h4>
<p>(I assume this was mostly the recent triage effort "most MTAIT issues are still tracked with the full TAIT feature GH label" :)</p>



<a name="245867640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245867640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245867640">(Jul 13 2021 at 18:31)</a>:</h4>
<p>The problem is more that we realized the implementation should be chnged</p>



<a name="245867669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245867669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245867669">(Jul 13 2021 at 18:31)</a>:</h4>
<p>It's probably worth repeating it</p>



<a name="245867751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245867751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245867751">(Jul 13 2021 at 18:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I'm curious btw how much work you've done towards removing "impl trait in let bindings"</p>



<a name="245867828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245867828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245867828">(Jul 13 2021 at 18:32)</a>:</h4>
<p>I've removed some parts already after a meeting I'm going to continue</p>



<a name="245896533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245896533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245896533">(Jul 13 2021 at 22:14)</a>:</h4>
<p>so the plan would be something like this ? </p>
<ul>
<li>first remove the impl trait in let bindings support</li>
<li>then change the implementation and defining uses as mentioned in the meeting notes</li>
<li>while in parallel finishing triage to check issues applying to MTAIT only and assessing and completing the existing test coverage</li>
</ul>



<a name="245968703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245968703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245968703">(Jul 14 2021 at 14:37)</a>:</h4>
<p>Yes, but</p>



<a name="245968733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245968733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245968733">(Jul 14 2021 at 14:37)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> and I were talking about the implementation and thinking it over</p>



<a name="245968762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245968762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245968762">(Jul 14 2021 at 14:37)</a>:</h4>
<p>in particular I was looking at this example:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">type</span> <span class="nc">TAIT1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="n">Debug</span><span class="p">;</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">TheTrait</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">TheType</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">TheTrait</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">TheType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TAIT1</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">foo</span><span class="p">(</span><span class="k">mut</span><span class="w"> </span><span class="n">x</span>: <span class="o">&lt;</span><span class="p">()</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">TheTrait</span><span class="o">&gt;</span>::<span class="n">TheType</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kt">u32</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="245970412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970412">(Jul 14 2021 at 14:50)</a>:</h4>
<p>I was thinking about what this would look like during lazy norm and so forth</p>



<a name="245970421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970421">(Jul 14 2021 at 14:50)</a>:</h4>
<p>And what's the best way to set this up</p>



<a name="245970465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970465">(Jul 14 2021 at 14:51)</a>:</h4>
<p>I had this MCP eariler that was proposing a different sort of approach, one where we left opaque bindings as "themselves"</p>



<a name="245970578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970578">(Jul 14 2021 at 14:52)</a>:</h4>
<p>But, in the <code>InferCtxt</code>, when we were asked to equate an opaque binding with another type, we would determine if it is "in scope" and -- if so -- accumulate a specific value for that type. Alternatively, if it is not in scope, we would treat it opaquely.</p>



<a name="245970590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970590">(Jul 14 2021 at 14:52)</a>:</h4>
<p>There were some challenges :)</p>



<a name="245970647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970647">(Jul 14 2021 at 14:52)</a>:</h4>
<p>But it would have the advantage of being a "lazy norm" like approach that doesn't require us to go ahead of time and <em>find</em> each place that a TAIT is used.</p>



<a name="245970738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970738">(Jul 14 2021 at 14:53)</a>:</h4>
<p>very interesting</p>



<a name="245970787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970787">(Jul 14 2021 at 14:53)</a>:</h4>
<p>I've been thiking about it a bit more</p>



<a name="245970815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970815">(Jul 14 2021 at 14:53)</a>:</h4>
<p>that does sound like "more work than originally anticipated" ^^</p>



<a name="245970868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245970868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245970868">(Jul 14 2021 at 14:54)</a>:</h4>
<p>Some thoughts:</p>



<a name="245971041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245971041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245971041">(Jul 14 2021 at 14:55)</a>:</h4>
<ul>
<li>One approach would be, in the inference context, that we basically have a distinct "hash table" with the values for each opaque type.</li>
</ul>



<a name="245971061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245971061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245971061">(Jul 14 2021 at 14:55)</a>:</h4>
<p>Essentially a new kind of inference variable, a somewhat simpler one perhaps</p>



<a name="245971242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245971242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245971242">(Jul 14 2021 at 14:56)</a>:</h4>
<p>It would probably be fairly straightforward to equip each infer ctxt with an <code>Option&lt;DefId&gt;</code> that corresponds to "scope for TAITs" and incorporate that logic. We could then make it so that when you do <code>resolve_if_possible</code> to resolve the values of inference variables, it also resolves the values of TAITs that are in-scope to their corresponding value (which may indeed be an inference variable). This kind of resolves the questions about how these interact with trait matching and other things.</p>



<a name="245971262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245971262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245971262">(Jul 14 2021 at 14:56)</a>:</h4>
<p>It does mean that unification is a bit more complex, which chalk will eventually have to learn and model.</p>



<a name="245971362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245971362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245971362">(Jul 14 2021 at 14:57)</a>:</h4>
<p>It also means that the <code>NEEDS_INFER</code> flag would have to be true for TAITs. We could potentially have "resolve" map opaque TAITs to an <em>opaque type</em> to help reduce that. I have no idea if this matters at all.</p>



<a name="245971398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245971398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245971398">(Jul 14 2021 at 14:57)</a>:</h4>
<p>This actually seems like a fairly small edit, not all that painful.</p>



<a name="245972296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245972296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245972296">(Jul 14 2021 at 15:01)</a>:</h4>
<p>if there are (somewhat accessible) tasks to do to that would help with this and the other steps in the plan, I'd be glad to take a look as well</p>



<a name="245972452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245972452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245972452">(Jul 14 2021 at 15:02)</a>:</h4>
<p>I had some more thoughts but I'm trying to remember what they were</p>



<a name="245972564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245972564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245972564">(Jul 14 2021 at 15:02)</a>:</h4>
<p>Well, in short, I kind of like this plan better than the other implementation strategies I've devised. I like that it takes away some of the "clever setup" logic and other things.</p>



<a name="245972801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245972801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245972801">(Jul 14 2021 at 15:04)</a>:</h4>
<p>It also provides a path to fixing this ergonomic annoyance:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">foo</span><span class="p">(</span><span class="n">x</span>: <span class="nc">impl</span><span class="w"> </span><span class="n">Trait</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">x</span><span class="p">.</span><span class="n">some_method_on_trait</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>Here, the value of <code>x</code> is not known, but presumable we <em>do</em> know that it implements <code>Trait</code>. If the type of <code>x</code> is "unresolved Opaque Type", we could potentially permit that, though I think in the first version as I imagined it, we probably wouldn't. This would be because we would effectively resolve the opaque type to an inference variable and hence error out.</p>



<a name="245993921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/245993921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#245993921">(Jul 14 2021 at 17:40)</a>:</h4>
<p>we should add your explanations above to the hackmd <a href="https://hackmd.io/FNLjLrevQcSKoIDAsf9ivQ?view">https://hackmd.io/FNLjLrevQcSKoIDAsf9ivQ?view</a></p>



<a name="246232446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246232446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246232446">(Jul 16 2021 at 14:45)</a>:</h4>
<p>So <span class="user-mention" data-user-id="124288">@oli</span> and I just had a good cha</p>



<a name="246232451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246232451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246232451">(Jul 16 2021 at 14:45)</a>:</h4>
<p>we covered the design above</p>



<a name="246232462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246232462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246232462">(Jul 16 2021 at 14:45)</a>:</h4>
<p>I'm feeling pretty excited, actually</p>



<a name="246232472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246232472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246232472">(Jul 16 2021 at 14:45)</a>:</h4>
<p>on the minus side, this is a big refactoring</p>



<a name="246232484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246232484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246232484">(Jul 16 2021 at 14:45)</a>:</h4>
<p>on the plus side, it feels much clearner, and I think it means that we actually don't have to settle for "minimal TAIT"</p>



<a name="246232497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246232497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246232497">(Jul 16 2021 at 14:45)</a>:</h4>
<p>we instead just basically get TAIT</p>



<a name="246236160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246236160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246236160">(Jul 16 2021 at 15:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> cool</p>



<a name="246236245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246236245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246236245">(Jul 16 2021 at 15:10)</a>:</h4>
<p>did you guys took notes on the discussions? interesting in learning about what you come up with</p>



<a name="246458129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246458129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246458129">(Jul 19 2021 at 14:00)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="124288">@oli</span>, TAITs sync?</p>



<a name="246458141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/TAITs%20sync/near/246458141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/TAITs.20sync.html#246458141">(Jul 19 2021 at 14:00)</a>:</h4>
<p>I fixed the calendar invite today so not sure if you saw that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>